﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.OleDb;

namespace ColorBall
{
    public partial class FrmHistory : Form
    {
        public FrmHistory(List<ColorBall> balls)
        {
            InitializeComponent();
            Balls = balls;
        }

        List<ColorBall> Balls;

        private void FrmHistory_Load(object sender, EventArgs e)
        {

            foreach (ColorBall ball in Balls)
            {
                List<object> datas = new List<object>();
                datas.Add(ball.Name);
                foreach (int redBall in ball.RedBall)
                {
                    datas.Add(redBall);
                }
                datas.Add(ball.BlueBall);


                this.dataGridView1.Rows.Add(datas.ToArray());

            }

            //this.dataGridView1 .Rows .Add (
        }






    }
}
